package com.codeyang.config;

import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 描述:mybatisplus 插件设置
 * 直接加上包扫描指定,这样所有依赖了 common的包都不需要在指定了
 *
 * @author CodeYang_Site
 * @version 2021/5/22 21:27
 */
@Configuration
@MapperScan(basePackages = {"com.codeyang.mapper"})
public class MybatisPlusConfig {

    /**
     * 分页插件
     * @return
     */
    @Bean
    public PaginationInnerInterceptor paginationInnerInterceptor() {
        return new PaginationInnerInterceptor();
    }
}
